select d.name, d.dbid
, suser_sname(sid) as [owner]
, convert(varchar(28),databasepropertyex(d.name,'status')) as [status]
, convert(varchar(12),databasepropertyex(d.name,'recovery')) as [recovery model]
, cast(b.[last_full_backup] as varchar(20)) as [last full backup]
, datediff(dd,last_full_backup,getdate()) as [days old]
, (select top 1 cast(backup_size/1024000.0 as numeric(11,1)) as filename from msdb..backupset s join msdb..backupmediafamily fam on fam.media_set_id = s.media_set_id
	where database_name = d.name and type = 'D' and backup_start_date = b.[last_full_backup] and server_name = serverproperty('servername') order by fam.media_set_id desc) as [backup_size MB]
, (select top 1 fam.physical_device_name as filename from msdb..backupset s join msdb..backupmediafamily fam on fam.media_set_id = s.media_set_id
	where database_name = d.name and type = 'D' and backup_start_date = b.[last_full_backup] and server_name = serverproperty('servername') order by fam.media_set_id desc) as filename
from master..sysdatabases d		-- or sys.databases d 
left outer join ( select database_name, max(backup_start_date) as [last_full_backup]
	from msdb..backupset s join msdb..backupmediafamily fam on fam.media_set_id = s.media_set_id 
	where s.type = 'D' and backup_finish_date is not null and server_name = serverproperty('servername')
	group by database_name ) b on d.name = b.database_name
where d.name <> 'tempdb' and status&1048!=1048
